package com.jy.shenghuilogistics.service;

import org.springframework.stereotype.Service;
import com.jy.shenghuilogistics.bean.Province;
import com.jy.shenghuilogistics.bean.Sitetb;
import com.jy.shenghuilogistics.dao.AreaMapper;
import com.jy.shenghuilogistics.dao.SiteMapper;

import javax.annotation.Resource;
import java.util.List;

@Service("backSiteService")
public class SiteService {
    @Resource
    SiteMapper siteMapper;
    @Resource
    AreaMapper areaMapper;
    /**
     * 站点模糊查询
     * @param s
     * @return
     */
    public List<Sitetb> getSite(Sitetb s) {
        return siteMapper.selSite(s);
    }
    /**
     * 根据名字获取站点
     * @param name
     * @return
     */
    public Sitetb getSiteByName(String name) {
        return siteMapper.selSiteByName(name);
    }

    /**
     * 获取所有省市区
     * @return
     */
    public List<Province> getAllPro() {
        return areaMapper.selAllPro();
    }
}
